
/*
PIC32MX795F512L 3.2" TFT LCD Demo Board Definition File
Copyright (C) 2012 Craig Dawson, Aaron Mohtar, Craig Peacock

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
*/
#define SYS_FREQ (80000000L)

#define LED1_DIR    TRISGbits.TRISG12
#define LED2_DIR    TRISGbits.TRISG13
#define LED3_DIR    TRISGbits.TRISG14
#define LED4_DIR    TRISGbits.TRISG15

#define LED1        LATGbits.LATG12
#define LED2        LATGbits.LATG13
#define LED3        LATGbits.LATG14
#define LED4        LATGbits.LATG15

#define S1_DIR      TRISCbits.TRISC1
#define S2_DIR      TRISCbits.TRISC2
#define S3_DIR      TRISCbits.TRISC3

#define S1          PORTCbits.RC1
#define S2          PORTCbits.RC2
#define S3          PORTCbits.RC3

#define RS          LATBbits.LATB15
#define RS_DIR      TRISBbits.TRISB15

#define CS          PORTDbits.RD11
#define CS_DIR      TRISDbits.TRISD11

#define WR          PORTDbits.RD4
#define WR_DIR      TRISDbits.TRISD4

#define RES         PORTBbits.RB14
#define RES_DIR     TRISBbits.TRISB14

#define TS_CS       PORTFbits.RF12
#define TS_CS_DIR   TRISFbits.TRISF12

// Support Functions
void consoleInit();
void delay_ms(unsigned int msec);
